package cn.fl.ass.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import cmm.mid.core.framework.page.DataResultVO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.ass.vo.AssDealRedeemVO;
import cn.fl.ass.vo.AssDealSellVO;
import cn.fl.commons.result.ResponseData;
import fl.ass.facade.condition.AssDealRedeemQueryCondition;

/**
 * @Description: 处置赎回表 客户端服务层接口
 * @Description: 持久层方法名称前缀：新增：insert* 删除：delete* 修改：update* 批量：batch* 查询对象：select* get* find* 查询集合：select*
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
public interface IAssDealRedeemService {
	
	/**
	 * 获取唯一对象
	 * @param id 主键
	 * @return 对象DTO
	 */
	public AssDealRedeemVO selectById(Long id)throws BaseException;
	
	/**
	 * 新增
	 * @param entity
	 * @return
	 */
    public Long add(AssDealRedeemVO entity) throws BaseException;

    /**
     * 删除
     * @param id
     * @return
     */
    public boolean removeById(Long id)throws BaseException;
    
    /**
     * 删除
     * @param ids
     * @return
     */
    public boolean removeByIds(List<Long> ids)throws BaseException;

    /**
     * 修改
     * @param entity
     * @return
     */
    public boolean modify(AssDealRedeemVO entity)throws BaseException;

    /**
     * 分页查询所有
     * @param page
     * @return
     */
    public Pager searchListPage(Pager page)throws BaseException;
    /**
     * 不分页查询
     * @param AssDealRedeemQueryCondition
     * @return
     */
	public List<AssDealRedeemVO> searchAssDealRedeemList(AssDealRedeemQueryCondition condition) throws BaseException;

    /**
     * 计算结清对客IRR和结清优惠金额1
     * @param paySchId 支付表id
     * @param stlAmt 赎回结清金额
     * @param stlStDt 结清申请时间
     * @return
     * @throws BaseException
     */
	public Map<String, Double> getCalcStlCstIRRAndDiscount(Long paySchId, Long stlAmt, Date stlStDt) throws BaseException;

    /**
     * 获得的irr和费用项插入数据库
     * @param redeemId 赎回表id
     * @param paySchId 支付表id
     * @param stlCstIrr 结清对客irr
     * @param discountAmt 结清优惠金额1
     * @return
     * @throws BaseException
     */
	public boolean saveStlCstIrrAndDiscountAmt(Long redeemId, Long paySchId, Double stlCstIrr, Double discountAmt, Long usrId) throws BaseException;

    /**
     * 根据不同的赎回类型校验是否可以发起拖车赎回流程
     * @param redeemTypCd
     * @return
     * @throws BaseException
     */
	public DataResultVO checkAssRedeemFlow4YQ(String redeemTypCd, Long prjPrdDtlId) throws BaseException;

    /**
     * 校验GPSfrom大数据
     * @param gpsDeviceNo GPS设备号
     * @param customManagerWorkNum 客户经理工号
     * @return
     * @throws BaseException
     */
    public ResponseData validateGpsDeviceOfHadoop(String gpsDeviceNo, String customManagerWorkNum) throws BaseException;

    /**
     * 校验GPS是否已经使用
     * @param gpsCardNo
     * @param prjPrdDtlId
     * @return
     * @throws BaseException
     */
    ResponseData validateGPSIsUsed(String gpsCardNo, Long prjPrdDtlId) throws BaseException;

    /**
     * 校验GPS整合方法
     * @param gpsNos
     * @param prjPrdDtlId
     * @param cstMgrId
     * @return
     * @throws BaseException
     */
    DataResultVO validateGPS(List<String> gpsNos, Long prjPrdDtlId, Long cstMgrId) throws BaseException;

}
